package wonder.tools;

import java.util.Map;

/**
 * <p>
 * IMessageTextProvider interface.
 * </p>
 * <p>
 * A IMessageTextProvider builds a text message from a template and a
 * {@link java.util.Map} of values.
 * </p>
 *
 * @author u211354
 * @version $Id: $
 */
public interface IMessageTextProvider {
    /** Constant <code>DEFAULT_ENCODING="ISO-8859-1"</code> */
    public static final String DEFAULT_ENCODING = "ISO-8859-1";

    /**
     * <p>
     * getMessage
     * </p>
     *
     * @param template a {@link java.lang.String} template with placeholders for
     *        values.
     * @param data a {@link java.util.Map} containing the values to insert in
     *        the template.
     * @return a {@link java.lang.String} containing the built text.
     * @throws java.lang.Exception if any.
     */
    public String getMessage(String template, Map<String,Object> data)
            throws Exception;

}
